package net.zjitc.doubao_community_backed.controller;/**
 * @Author 董熠涛
 * @Date 2025/6/19  2:07
 */

/**
 * @Author:董熠涛
 * @ 2025/6/192:07
 */

import jakarta.annotation.Resource;
import net.zjitc.doubao_community_backed.api.ApiResult;
import net.zjitc.doubao_community_backed.model.entity.BmsPromotion;
import net.zjitc.doubao_community_backed.service.IBmsPromotionService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/promotion")
public class BmsPromotionController  {

    @Resource
    private IBmsPromotionService bmsPromotionService;

    @GetMapping("/all")
    public ApiResult<List<BmsPromotion>> list() {
        List<BmsPromotion> list = bmsPromotionService.list();
        return ApiResult.success(list);
    }

}
